<!doctype htmlostileue
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width,user-scalable=no"name="viewport">
<title>我要反馈</title>
<link rel="stylesheet" type="text/css" href="{:C('WEB_URL')}Public/customer/css/base.css" />
<link rel="stylesheet" type="text/css" href="{:C('WEB_URL')}Public/customer/css/style.css" />
<link rel="stylesheet" type="text/css" href="{:C('WEB_URL')}Public/customer/css/bootstrap.min.css" />
<script type="text/javascript" charset="UTF-8" src="{:C('WEB_URL')}Public/customer/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="{:C('WEB_URL')}Public/customer/js/bootstrap.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="{:C('WEB_URL')}Public/customer/js/script.js"></script>
<script type="text/javascript" charset="UTF-8" src="{:C('WEB_URL')}Public/customer/js/jQuery.textSlider.js" /></script>
<style>
  .file {  
    position: relative;  
    display: inline-block;  
    background: #99D3F5;  
    border: 1px solid #99D3F5;  
    border-radius: 4px;  
    padding: 4px 12px;  
    overflow: hidden;  
    color: #1E88C7;  
    text-decoration: none;  
    text-indent: 0;  
    line-height: 20px;  
}  
.file input {  
    position: absolute;  
    font-size: 100px;  
    right: 0;  
    top: 0;  
    opacity: 0;  
}  
.file:hover {  
    background: #AADFFD;  
    border-color: #78C3F3;  
    color: #004974;  
    text-decoration: none;  
}  
</style>
</head>
<body>
<div id="box">
 <div class="navbar navbar-default navbar-fixed-top">
  <header>
   <h1><a href="more.html"><span class="glyphicon glyphicon-menu-left"></span></a></h1>
   <p class="title">我要反馈</p>
  </header>
 </div><!--navbar-fixed-top-->
 <div class="feedback">
 	<form id='myForm' method="post" enctype="multipart/form-data">
  <action>
   <p><img src="{:C('WEB_URL')}Public/customer/images/feedback_03.jpg" />常用反馈问题</p>
   <div id='changYong' class="changYong">
   	<!--<p><a href="#">优惠次数出错了</a></p>
   	<p class="feedRight"><a href="#">充值出错了</a></p>
   	<p><a href="#">分享没奖励</a></p>
   	<p class="feedRight"><a href="#">其他</a></p>-->
   	<p><a href="#">优惠次数出错了</a></p>
   	<p class="feedRight"><a href="#">充值出错了</a></p>
   	<p><a href="#">分享没奖励</a></p>
   	<p class="feedRight"><a href="#">其他</a></p>
	<input type="hidden"  name='val' id='val' value=""/>
   </div>
  </action>
  <action>
   <p><img src="{:C('WEB_URL')}Public/customer/images/feedback_07.jpg">截屏出错页面，便于说明出错问题</p>
   <div class="changYong">
   	<div >
    <a href="javascript:;" class="file">选择文件 
     <input type="file" name="file" class="file" id="text1" />
    </a> 
   </div>
   </div>
  </action>
  <action>
   <p><img src="{:C('WEB_URL')}Public/customer/images/feedback_15.jpg" />输入文字描述你想反馈的问题</p>
   <div class="changYong">
   	<input type="text" class="text"  name="haha"/>
   </div>
  </action>
  <action>
   <!--<p class="feedSub"><a href="#" id="but">提交</a></p>-->
    <p class="feedSub"><a href="#" id="cun">提交</a></p>

  </action>
  
  </form>
 </div><!--feedback-->
 <div class="navbar navbar-default navbar-fixed-bottom">
   <footer id="foot">
    <dl>
     <dt><a href="{:U('index')}"><img src="{:C('WEB_URL')}Public/customer/images/mores_15.jpg" /></a></dt>
     <dd><a href="{:U('index')}">首页</a></dd>
    </dl>
    <dl>
     <dt><a href="http://www.nleaves.com/qinqin/wechat/user/recommends?uid={$_SESSION[user_id]}"><img src="{:C('WEB_URL')}Public/customer/images/mores_17.jpg" /></a></dt>
     <dd><a href="http://www.nleaves.com/qinqin/wechat/user/recommends?uid={$_SESSION[user_id]}">推荐有奖</a></dd>
    </dl>
    <dl>
     <dt><a href="{:U('more')}"><img src="{:C('WEB_URL')}Public/customer/images/mores_19.jpg" /></a></dt>
     <dd><a href="{:U('more')}" class="current">更多</a></dd>
    </dl>
   </footer>
  </div><!--/navbar-->	
</div><!--box-->
<!--会员卡二维码弹出页面 -->
<a href="more.html" class="a_click" style="color:#666"><div id="popup">
 <div id="click_div">
   <div id="dialog">
    <h3><img src="{:C('WEB_URL')}Public/customer/images/feed_03.jpg" /></h3>
	<div class="dialogCont">
	 <p>您的意见已经成功反馈！我们会尽快与您取得联系！</p>
	 <h5>感谢您的支持，您的支持是我们最大的动力！</h5>
	</div><!--dialogCont-->
   </div><!--dialog-->
 </div>
</div></a>
<!--会员卡二维码弹出页面 End-->
<script type="text/javascript">
//微信判断header是否显示
if(isWeiXin()){ 
//alert("====");
$(".title").hide();
} 
else{
//alert("+++++");
}
//会员卡二维码弹出页面 JS
$("#but").click(function(){
	$("#click_div").show();
})  
$(".a_click").click(function(){
	$("#click_div").hide();
});


function check_form(form_id) {
              last_submit = $('#' + form_id).data('last_submit');
              current_submit = new Date().getTime();
              if (last_submit == undefined) {
                $('#' + form_id).data('last_submit', new Date().getTime());
              } else {
                if (current_submit - last_submit > 600) {
                  $('#' + form_id).data('last_submit', new Date().getTime());
                } else {
                  return false;
                }
              }
              if ( typeof (tinyMCE) != 'undefined') {
                tinyMCE.triggerSave(true);
              }

              var check_flag = true;
              $("#" + form_id + " :input").each(function(i) {
                if ($(this).attr("check")) {
                  if (!validate($(this).val(), $(this).attr("check"))) {
                    ui_error($(this).attr("msg"));
                    $(this).focus();
                    check_flag = false;
                    return check_flag;
                  }
                }
              });
              return check_flag;
            }


      function sendForm(formId, post_url, return_url) {
            if (check_form(formId)) {
              //绑定beforeunload事件
              $(window).unbind('beforeunload', null);
              if ($("#ajax").val() == 1) {
                var vars = $("#" + formId).serialize();
                $.ajax({
                  type : "POST",
                  url : post_url,
                  data : vars,
                  dataType : "json",
                  success : function(data) {
                    if (data.status) {
                      ui_alert(data.info, function() {
                        if (return_url) {
                          location.href = return_url;
                        }
                      });
                    } else {
                      ui_error(data.info);
                    }
                  }
                });
              } else {
                $("#" + formId).attr("action", post_url);
                if (return_url) {
                  set_cookie('return_url', return_url);
                }
                $("#" + formId).submit();
              }
            }
          }
      		$('#changYong a').click(function(){
      			$('#changYong a').removeClass('check');
      			$(this).addClass('check');
      			$('#val').val($(this).html());
      		
      		})
      		
          $('#cun').click(function(){
            sendForm("myForm","{:U('User/tickling')}");
          })


          $('#foot dl').on("touchstart",function(){
  // alert(1);
  $('#foot dl').css("background-color","#fff")
  $(this).css("background-color","#ddd")
})
$('#foot dl').on("touchend",function(){
  // alert(1);
  $('#foot dl').css("background-color","#fff")

})
</script>
</body>
</html>
